package com.gitee.nacos.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties("spring.cloud.nacos.discovery")
public class MyNacosDiscoveryProperties {

    /**
     * nacos discovery server address.
     */
    private String serverAddr;

    /**
     * namespace, separation registry of different environments.
     */
    private String namespace;

    /**
     * service name to registry.
     */
    @Value("${spring.cloud.nacos.discovery.service:${spring.application.name:}}")
    private String service;

    public String getServerAddr() {
        return serverAddr;
    }

    public void setServerAddr(String serverAddr) {
        this.serverAddr = serverAddr;
    }

    public String getNamespace() {
        return namespace;
    }

    public void setNamespace(String namespace) {
        this.namespace = namespace;
    }

    public String getService() {
        return service;
    }

    public void setService(String service) {
        this.service = service;
    }
}
